import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { TestChildService } from './test-child.service';
import { CreateTestChildDto } from './dto/create-test-child.dto';
import { UpdateTestChildDto } from './dto/update-test-child.dto';

@Controller('test-child')
export class TestChildController {
  constructor(private readonly testChildService: TestChildService) {}

  @Post()
  create(@Body() createTestChildDto: CreateTestChildDto) {
    return this.testChildService.create(createTestChildDto);
  }

  @Get()
  findAll() {
    return this.testChildService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.testChildService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateTestChildDto: UpdateTestChildDto) {
    return this.testChildService.update(+id, updateTestChildDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.testChildService.remove(+id);
  }
}
